#pragma once

// LCD屏幕
#include "base_component.h"

class LCD : public BaseComponent {
public:
    LCD();
    void print() override;
    int save(YAML::Node& node) override;
    int setDisplayModel(std::string size);
    void setDisplaySize(std::string size);  // Added set method for display size

private:
    std::string _displayModel;
    std::string _displaySize;  // Added display size attribute
};

namespace YAML {
template <>
struct convert<LCD> {
    static bool decode(const Node& node, LCD& lcd) {
        lcd.setDisplayModel(node["displayModel"].as<std::string>());
        lcd.setDisplaySize(node["displaySize"].as<std::string>());
        return true;
    }
};
}  // namespace YAML
